@extends('wap.layouts.master')
@section('title','个人中心')

@section('content')

<div class="aw-main aw-user aw-user-index">
	<div class="aw-bg-1 aw-assest-user-top-img">
		<div class="aw-user-top-bg"><img src="/wap/img/bg_1.png"></div>
		<div class="aw-user-top-poa aw-user-index-desc">
			<div class="aw-user-desc-img" v-if="is_login>0"><img :src="info.img ? info.img : '/wap/img/login_img.png'" onerror="javascript:this.src='/img/default_160_160.png';"></div>
			<div class="aw-user-desc-btn" v-if="is_login>0">
				<p>@{{info.nickname}}</p>
			</div>
			<div class="aw-user-desc-img" v-if="is_login==0"><img src="/wap/img/login_img.png"></div>
			<div class="aw-user-desc-btn" v-if="is_login==0">
				<a href="/wap/common/login" class="aw-assest-btn aw-btn-radius aw-btn-brcolor-baise aw-bg-fff">登录</a>
			</div>
		</div>
	</div>
	<div class="aw-index-border"></div>
	<ul class="aw-index-list aw-bg-fff">
		<li class="aw-my-li aw-w3333b">
			<i class="aw-icon aw-icon-user-san aw-icon-user-san-1"></i>
			<p>我的球队</p>
			<a :href="Herf_Team_Url()" class="aw-position_a_a"></a>
		</li>
		<li class="aw-my-li aw-w3333b">
			<i class="aw-icon aw-icon-user-san aw-icon-user-san-2"></i>
			<p>我的赛程</p>
			<a href="/wap/user/schedule" class="aw-position_a_a"></a>
		</li>
		<li class="aw-my-li aw-w3333b">
			<i class="aw-icon aw-icon-user-san aw-icon-user-san-3"></i>
			<p>二维码</p>
			<a href="/wap/user/code" class="aw-position_a_a"></a>
		</li>
		<li class="aw-my-li-border aw-left-3333"></li>
		<li class="aw-my-li-border aw-right-3333"></li>
	</ul>
	<!--选项-开始-->
	<ul class="aw-assest-form aw-bg-fff aw-mt10">
		<li class="aw-form-li">
			<div class="aw-left aw-left-icon"><i class="aw-icon aw-icon-user-index aw-icon-user-index-1"></i>我的订单</div>
			<div class="aw-conter"></div>
			<div class="aw-icon aw-icon-more aw-right"></div>
			<a href="/wap/order/list" class="aw-position_a_a"></a>
		</li>
	</ul>
	<ul class="aw-assest-form aw-bg-fff aw-mt10">
		<li class="aw-form-li">
			<div class="aw-left aw-left-icon"><i class="aw-icon aw-icon-user-index aw-icon-user-index-2"></i>会员积分</div>
			<div class="aw-conter"></div>
			<div class="aw-icon aw-icon-more aw-right"></div>
			<a href="/wap/user/integral" class="aw-position_a_a"></a>
		</li>
		<li class="aw-form-li">
			<div class="aw-left aw-left-icon"><i class="aw-icon aw-icon-user-index aw-icon-user-index-3"></i>我的卡卷</div>
			<div class="aw-conter"></div>
			<div class="aw-icon aw-icon-more aw-right"></div>
			<a href="/wap/user/card" class="aw-position_a_a"></a>
		</li>
	</ul>
	<ul class="aw-assest-form aw-bg-fff aw-mt10">
		<li class="aw-form-li">
			<div class="aw-left aw-left-icon"><i class="aw-icon aw-icon-user-index aw-icon-user-index-4"></i>个人信息</div>
			<div class="aw-conter"></div>
			<div class="aw-icon aw-icon-more aw-right"></div>
			<a href="/wap/user/info" class="aw-position_a_a"></a>
		</li>
		<li class="aw-form-li">
			<div class="aw-left aw-left-icon"><i class="aw-icon aw-icon-user-index aw-icon-user-index-5"></i>订场须知</div>
			<div class="aw-conter"></div>
			<div class="aw-icon aw-icon-more aw-right"></div>
			<a href="/wap/common/info" class="aw-position_a_a"></a>
		</li>
	</ul>
	<div class="aw-index-btn aw-mt20" v-if="is_login>0">
		<a v-on:click="Click_Exit_Logon()" href="javascript:;">- 退出登录 -</a>
	</div>
	<!--选项-结束-->
</div>
@include('wap.layouts.nav_booking')

@section('pagejs')
@parent
<script type="text/javascript">
	$('#aw-icon-user-index').addClass('aw-icon-user-head-hover');
var MJS_User_Info=GBC_User_Info;
var User_id=0;
if(!MJS_User_Info){
	$('a').attr('href','/wap/common/login')
}else{
	User_id=MJS_User_Info.id;
	if(MJS_User_Info.status==2){
		$('a').attr('href','javascript:;')
	}
}

$(document).on('click','a',function(){
	if(MJS_User_Info.status==2){
		msgTips('账户被禁用,请联系管理员',1)
	}
})
var Vue_Data={
	info:{},
	team_list:{},
	is_login:User_id
}
if(User_id){
//用户详情
var AD_user_info={
	api:'/api/user/user-info',
	form_data:{id:MJS_User_Info.id},
	tips:false,
}
getData(AD_user_info,function(ajax_data_info){
	Vue_Data.info=ajax_data_info;
	Vue_Data.team_list=ajax_data_info.team_list.list;
	Post_Browser_Cache('user_info',ajax_data_info)
})
}
vm=new Vue({
	el:'#Vue-body',
	data:Vue_Data,
	methods:{
		Herf_Team_Url:function(){
			if(!MJS_User_Info){
				return
			}
			var team_list=this.team_list;
			var length=team_list.length;
			console.log(length)
			if(length>0){
				return '/wap/team/my';
			}else{
				return '/wap/team/null';
			}
		},Click_Exit_Logon:function(){
			if(MJS_User_Info.status==2){
				return;
			}
			var AD_login_out={
				api:'/api/common/login-out',
				form_data:{},
				tips:false,
				to_url:'/wap/common/login'
			}
			getData(AD_login_out,function(ajax_data){
				Del_Browser_Cache('user_info')
				location.href='/wap/common/login'
			})
		}
	}
})
</script>
@endsection

@endsection

